#!/bin/sh
#rem Param 1: System User
#rem Param 2: System Passwort
#rem Param 3: Connection key in tnsnames.ora

system_user=$1
system_pass=$2
connection=$3

if [ -z "$system_user" ]; then
    error="err" 
fi

if [ -z "$system_pass" ]; then 
    error="err" 
fi

if [ -z "$connection" ]; then 
    error="err" 
fi
if [ -n "$error" ]; then
    echo 'Missing parameter!'
    echo 'Syntax:'
    echo 'omssetup [system user] [system passwort] [tnsnames.ora connection key]'
else
    sqlplus ${system_user}/${system_pass}@${connection} @setup/startplsql.sql 
fi
